//
//  SelfSizeTool.m
//  10-UISelfSize
//
//  Created by Snow on 16/7/27.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "SelfSizeTool.h"

@implementation SelfSizeTool

+ (CGFloat)selfSizeWithNSString:(NSString *)string width:(CGFloat)width font:(UIFont *)font
{
    CGRect newRect = [string boundingRectWithSize:CGSizeMake(width, 0) options:1 attributes:@{NSFontAttributeName : font} context:nil];
    return newRect.size.height + 1;
}
@end
